// import formidable from "formidable";
// 兼容高版本 nodejs
import { createRequire } from 'module';
const require = createRequire(import.meta.url);

import config from './config/config.default.js'

// 引入koa
const Koa  = require('koa')

//  创建响应实例
const  app = new Koa()

app.use((ctx,next)=>{
 ctx.body = 'hello world'
})
app.listen(config.APP_PORT,()=>{
    console.log(`server port ${config.APP_PORT}  on ${config.APP_PORT} http://localhost:${config.APP_PORT}` )
})